package cn.springBoot.listener;

import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.DelegateTask;
import org.camunda.bpm.engine.delegate.ExecutionListener;
import org.camunda.bpm.engine.delegate.TaskListener;

import java.util.ArrayList;
import java.util.List;

/**
 * @author ljx
 * @description: 开始节点 执行监听监听
 * @class cn.springBoot.listener.StartListener
 * @create date: 2021/9/29
 */

public class StartListener implements ExecutionListener, TaskListener {
    @Override
    public void notify(DelegateExecution delegateExecution) throws Exception {
        System.out.println("**********执行监听**************");
        System.out.println("开始节点");
        System.out.println("类型："+delegateExecution.getVariablesTyped());
        System.out.println("************************");
    }

    @Override
    public void notify(DelegateTask delegateTask) {

        System.out.println("**********任务监听**************");
        System.out.println("开始节点");
        System.out.println("类型："+delegateTask.getVariablesTyped());
        System.out.println("************************");
    }
}
